package com.xsq.rpc.common.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @ClassName CuratorZookeeperProperties
 * @Description TODO
 * @Author xsq
 * @Date 2020/6/8 11:21
 **/
@Component
@ConfigurationProperties(prefix = "xsq.zk")
public class CuratorZookeeperProperties {
    /**
     *  首次重试睡眠时间
     */
    private Integer baseSleepTimeMs;
    /**
     * 最大重试次数
     */
    private Integer maxRetries;
    /**
     * zk的server地址
     */
    private String connectString;
    /**
     * 连接超时时间
     */
    private Integer connectionTimeoutMs;
    /**
     * 会话超时时间
     */
    private Integer sessionTimeoutMs;

    private String zkBaseUrl;

    private String  serverName;

    public Integer getBaseSleepTimeMs() {
        return baseSleepTimeMs;
    }

    public void setBaseSleepTimeMs(Integer baseSleepTimeMs) {
        this.baseSleepTimeMs = baseSleepTimeMs;
    }

    public Integer getMaxRetries() {
        return maxRetries;
    }

    public void setMaxRetries(Integer maxRetries) {
        this.maxRetries = maxRetries;
    }

    public String getConnectString() {
        return connectString;
    }

    public void setConnectString(String connectString) {
        this.connectString = connectString;
    }

    public Integer getConnectionTimeoutMs() {
        return connectionTimeoutMs;
    }

    public void setConnectionTimeoutMs(Integer connectionTimeoutMs) {
        this.connectionTimeoutMs = connectionTimeoutMs;
    }

    public Integer getSessionTimeoutMs() {
        return sessionTimeoutMs;
    }

    public void setSessionTimeoutMs(Integer sessionTimeoutMs) {
        this.sessionTimeoutMs = sessionTimeoutMs;
    }

    public String getZkBaseUrl() {
        return zkBaseUrl;
    }

    public void setZkBaseUrl(String zkBaseUrl) {
        this.zkBaseUrl = zkBaseUrl;
    }

    public String getServerName() {
        return serverName;
    }

    public void setServerName(String serverName) {
        this.serverName = serverName;
    }
}
